package com.codingfuture.st200.controller;

import com.codingfuture.st200.service.MainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CollectionController {

    @Autowired
    private MainService mainService;

    @GetMapping("/collection")
    public String collection() {
        mainService.publish();
        mainService.sub();
        return "OK";
    }
}
